package com.yanqu.road.entity.unioncampwar.config;

import com.yanqu.road.utils.property.Property;
import com.yanqu.road.utils.property.PropertyHelper;

public class UnionCampWarBuffConfig {
    private int buffId;
    private int perNum; //每多少次生效
    private int revertHpPer;//恢复血量千分比
    private int effectMax;//生效次数上限
    private int buffGrade; //buff档位
    private Property cost;//消耗

    public UnionCampWarBuffConfig(int id, String value) {
        //5;10;101000=0;10
        String[] split = value.split(";");
        this.buffId = id;
        this.perNum = Integer.valueOf(split[0]);
        this.revertHpPer = Integer.valueOf(split[1]);
        this.cost = PropertyHelper.parseStringToProperty(split[2]);
        this.effectMax = Integer.valueOf(split[3]);
        this.buffGrade = Integer.valueOf(split[4]);
    }

    public int getBuffId() {
        return buffId;
    }

    public void setBuffId(int buffId) {
        this.buffId = buffId;
    }

    public int getPerNum() {
        return perNum;
    }

    public void setPerNum(int perNum) {
        this.perNum = perNum;
    }

    public int getEffectMax() {
        return effectMax;
    }

    public void setEffectMax(int effectMax) {
        this.effectMax = effectMax;
    }

    public int getRevertHpPer() {
        return revertHpPer;
    }

    public void setRevertHpPer(int revertHpPer) {
        this.revertHpPer = revertHpPer;
    }

    public Property getCost() {
        return cost;
    }

    public void setCost(Property cost) {
        this.cost = cost;
    }

    public int getBuffGrade() {
        return buffGrade;
    }
}
